"""
Input:
3
Output:
58,91

Input:
4
Output:
34,45,97
"""

def find_last_person(nums, num):
    while(len(nums) >= num):
        tmp = nums[num:] + nums[:num-1]
        nums = tmp
    return nums

def main():
    num = int(input())
    if num <= 1 or num >= 100:
        print("ERROR!")
        return
    
    nums = list(range(1, 101))
    result = find_last_person(nums, num)
    result.sort()

    print(",".join(map(str, result)))

if __name__ == "__main__":
    main()